package request


type TaobaoMiniappCloudFunctionInvokeRequest struct {
    /*
        云函数名称     */
    Name  *string `json:"name" required:"true" `
    /*
        指定云函数的handler     */
    Handler  *string `json:"handler" required:"true" `
    /*
        调用云函数时的传参（JSON格式） defalutValue��{}    */
    Data  *string `json:"data,omitempty" required:"false" `
    /*
        云环境     */
    Env  *string `json:"env" required:"true" `
    /*
        扩展协议参数 defalutValue��{}    */
    Exts  *string `json:"exts,omitempty" required:"false" `
}

func (s *TaobaoMiniappCloudFunctionInvokeRequest) SetName(v string) *TaobaoMiniappCloudFunctionInvokeRequest {
    s.Name = &v
    return s
}
func (s *TaobaoMiniappCloudFunctionInvokeRequest) SetHandler(v string) *TaobaoMiniappCloudFunctionInvokeRequest {
    s.Handler = &v
    return s
}
func (s *TaobaoMiniappCloudFunctionInvokeRequest) SetData(v string) *TaobaoMiniappCloudFunctionInvokeRequest {
    s.Data = &v
    return s
}
func (s *TaobaoMiniappCloudFunctionInvokeRequest) SetEnv(v string) *TaobaoMiniappCloudFunctionInvokeRequest {
    s.Env = &v
    return s
}
func (s *TaobaoMiniappCloudFunctionInvokeRequest) SetExts(v string) *TaobaoMiniappCloudFunctionInvokeRequest {
    s.Exts = &v
    return s
}

func (req *TaobaoMiniappCloudFunctionInvokeRequest) ToMap() map[string]interface{} {
    paramMap := make(map[string]interface{})
    if(req.Name != nil) {
        paramMap["name"] = *req.Name
    }
    if(req.Handler != nil) {
        paramMap["handler"] = *req.Handler
    }
    if(req.Data != nil) {
        paramMap["data"] = *req.Data
    }
    if(req.Env != nil) {
        paramMap["env"] = *req.Env
    }
    if(req.Exts != nil) {
        paramMap["exts"] = *req.Exts
    }
    return paramMap
}

func (req *TaobaoMiniappCloudFunctionInvokeRequest) ToFileMap() map[string]interface{} {
    fileMap := make(map[string]interface{})
    return fileMap
}